Formula
H(i,j) = (1 / 2pi sigma^2) e^{[(i-k-1)^2 + (j-k-1)^2] / (2*sigma^2)}
The size of the filter is 2k+1 and (i, j) represents a position in the coordinate. The origin of coordinate is the central position of the filter. Pi is circumference ratio and sigma is standard deviation.
Code
|
|